package com.onpositive.wiki3.db.catmodel.matches;

import com.onpositive.wiki3.db.catmodel.Category;
import com.onpositive.wiki3.db.catmodel.ICategoryMatcher;

public class LineCollapser implements ICategoryMatcher{

	@Override
	public int accept(Category st) {
		if (st.parentCount()==1){
			Category parent = st.getParent(0);
			st.replaceOn(parent);
			accept(parent);
		}
		return 0;
	}

}
